import React from 'react';
import {Modal, Space} from 'antd';
import '../styles/photo.scss';
import imgUrlBase from '../helpers/imgUrlBase';

const PhotoPreviewList = (props) => {

  const {list} = props;
  console.log(list);
  return (
    <Space>
      {
        list.map((src, index) =>
          <img
            className="photo-preview"
            src={imgUrlBase(src) + src}
            alt=""
            key={index}
            onClick={() => {
              Modal.info({
                icon: null,
                width: 1000,
                title: '查看大图',
                content: <img className="photo-detail" src={imgUrlBase(src) + src} alt=""/>
              });
            }}
          />
        )
      }

    </Space>

  );
};

export default PhotoPreviewList;